simh HP3000 Emulation Notes

Contents

Assumptions	2

Resources	2

Warning Will Robinson! Shutting down the system!	4

Noted Problems	4

Restoring my Installation	5

Fast Setup	5

How to Build a system from Scratch	6

Build the Emulator	6

Connect to the Emulator Using putty/Telnet	7

Connect to the Emulator Using Reflections	8

Getting Files on to the HP3000 via Tape	10

Setting up RWIN to do File Transfers	13

Upload QUAD	19

Upload and Install System UDC	20

Setup Games Account	21

Running Games	24

Assumptions

I'm going to assume you know a little about the HP3000. I'm not going to explain things obvious to an HP3000 user such as how to log into the system, though I expect my example to show me doing such task. Just w/o explantion.

Resources

Basic Info on github:

https://github.com/simh/simh/blob/master/HP3000/hp3000_release.txt

The main source for detailed information on the HP3000 simulator:

http://alum.mit.edu/www/jdbryan/hp3000_doc.pdf

HP3000 Document Library:

http://www.bitsavers.org/pdf/hp/3000/

The HP3000 Operation Manual:

http://www.bitsavers.org/pdf/hp/3000/mpeV/32033-90005_MPE_V_System_
Operation_and_Resource_Management_Feb86.pdf

The HP3000 Command Reference:

http://www.bitsavers.org/pdf/hp/3000/mpeV/32033-90006_MPE_V_Comma
nds_Oct88.pdf

The windows binaries for the most current simh (which will include the HP3000 emulator in it):

https://github.com/simh/Win32-Development-Binaries

Version used in this document:

https://github.com/simh/Win32-Development-Binaries/blob/Win32-Developm
ent-Binaries/simh-4.0-Current--2018-05-01-4e508cfc.zip

The MPE V/R Operating system:

http://www.bitsavers.org/bits/HP/HP_3000/32002-11018_Rev-2548.zip

Warning Will Robinson! Shutting down the system!

If you just abort the simulation, you could very well corrupt the HP3000's disk. Like other complex operating systems, it doesn't like crashes. Restoring a corrupted system is no fun so (1) shut down the operating system properly with =SHUTDOWN and (2), keep a copy of your hard drive file if you make changes to it you don't want to loose.

To shut down, at the console, type control-A to get the = console prompt, then type shutdown:

=SHUTDOWN

SESSION ABORTED BY SYSTEM MANAGEMENT

CPU=1. CONNECT=5. MON, MAY 14, 1990, 11:20 AM

11:20/#S4/21/LOGOFF ON LDEV #20

11:20/1/ALL JOBS LOGGED OFF

SHUT

Programmed halt, CIR: 030377 (HALT 17), P: 161440 (BR P-1)

sim>

Noted Problems

The instructions indicate you should set the ATC (async terminal controller) data port to 8B before attempting to do binary transfers. My instructions below do indicate to do that. However, I still had a lot of trouble with lockups of RWIN.

I found if I configure the transfer to 7 bit, I didn't need to mess with the ATC and I didn't have many issues. Here is the setting in RWIN:

Further, I have found in RWIN (not sure if this is a problem in putty) that if I do a control-s to suspend output by the HP3000, it will end up resulting in a terminal buffer overflow (MPE Table TBUF has overflowed!!! on console) which in turn hangs RWIN.

I've found no solution to this problem.

This version of MPE is old enough a lot of the utility code I have doesn't work. I heavily used MPEZ (a shell for MPE) but it needs an external library that was not yet available in MPE/V R.

Restoring my Installation

Along with this document, you should have an hp3000Sim.zip file. This is a straight zip of my working version of the simulator. You can just unzip it directly into c:\hp3000Sim and not mess with transferring files onto a brand new hard drive as supplied by the simH folks.

Fast Setup

These instruction show how to setup the HP3000 simulator using files from my actual installation. This is a super simple way to get a running system fast. The downside is it used the HP3000 simulator as it exists when I created the backup.

I believe all the external files I use below can be found in my c:\hp3000Sim\src directory so you only need to go looking for them if you want newer versions.

How to Build a system from Scratch

If you want to build your own system using the lastest versions of software, here is how I built my system.

Build the Emulator

•	The windows binaries for simH are here:

https://github.com/simh/Win32-Development-Binaries

Download the binary you want to use. I used the binary dated 05/14/2018, so any after that should include the hp3000.exe.

I will be placing all of the files in this example in c:\hp3000Sim. If you decide to use another location, reference that location when I mention c:\hp3000Sim.

•	Create the directory c:\hp3000Sim.

•	Open the simh zip file you downloaded. Locate the file hp3000.exe and copy it to c:\hp3000Sim.

•	Next, you must download the operating system disk. This is located here:

http://www.bitsavers.org/bits/HP/HP_3000/mpe-vr-software-kit.zip

•	Extract the mpe-vr-software-kit.zip file to c:\hp3000sim.

•	Build hp.bat

To make life a little easier, I created hp.bat to invoke the emulator. This file consists simply of:

c:\hp3000sim\hp3000.exe c:\hp3000sim\mpe-auto.sim

•	Start the emulator. Just type hp:

C:\hp3000Sim>hp

C:\hp3000Sim>c:\hp3000sim\hp3000.exe c:\hp3000sim\mpe-auto.sim

HP 3000 simulator V4.0-0 Current git commit id: 4e508cfc

Logging to file "mpe-auto.log"

c:\hp3000sim\mpe-auto.sim-45> attach atcd 1054

Listening on port 1054

c:\hp3000sim\mpe-auto.sim-50> attach -n lp lp.txt

LP: creating new file

Cold load complete, P: 177664 (PSHR Q)

Press <CR> to start MPE.

HP32002E.01.00

WHICH OPTION <WARMSTART/COOLSTART>? COOLSTART

ANY CHANGES? NO

DATE (M/D/Y)?05/10/90

TIME (H:M)?14:21

THU, MAY 10, 1990, 2:21 PM? (Y/N)Y

LOG FILE NUMBER 5 ON

*WELCOME*

:HELLO OPERATOR.SYS;HIPRI

14:21/13/SP#6/SPOOLED OUT

14:21/#S1/14/LOGON FOR: OPERATOR.SYS,OPERATOR ON LDEV #20

HP3000 / MPE V E.01.00 (BASE E.01.00). THU, MAY 10, 1990, 2:21 PM

:SHOWME

USER: #S1,OPERATOR.SYS,OPERATOR (NOT IN BREAK)

MPE VERSION: HP32002E.01.00. (BASE E.01.00).

CURRENT: THU, MAY 10, 1990, 2:24 PM

LOGON: THU, MAY 10, 1990, 2:21 PM

CPU SECONDS: 1 CONNECT MINUTES: 4

$STDIN LDEV: 20 $STDLIST LDEV: 20

:

You now have a running HP3000! Note the date the script entered during the boot process. It is WRONG, but it has to be. This version of MPE/V did not yet support Y2K. The script will pick a year in which the current month, day, and day of week are valid. That's about the best you can hope for.

Connect to the Emulator Using putty/Telnet

This HP3000 supports only serial connections (the networking module, DS3000, is not available). However, the emulator is set up to connect Telnet connection via port 1054 to the async terminal control (ATC).

The console (ldev 20 in the operating system) connects to ATC port 0. The first telnet session will connect to ldev 21, ATC port 1 and so forth. You'll need to know this later if you want to do file transfers via the serial port.

I have putty installed and connecting is quite simple:

When you connect, press the return key as it was called (enter on a PC) once or twice for baud rate sensing and you get a colon prompt:

Connect to the Emulator Using Reflections

If you want to transfer files to the HP3000 using a serial port, you will need to use WRQ's Reflections (RWIN) program. It's not free, but if you are an HP3000 buf you probably have a copy.

To configure RWIN to access the HP3000 emulator, goto Connection Setup, select Network and Telnet and localhost for hostname.

Then click on more settings. Set the port for 1054:

Save these settings, then go to Setup | Terminal and set the termtype to hp2392a:

Now connect to the HP3000. Press return a couple of times and you should have a prompt:

Getting Files on to the HP3000 via Tape

I spent more time than I care to admit trying to figure out how to transfer a file into the HP3000. There is no networking available, and the RWIN transfer program, PCLINK2, does not exist on the operating system. Not surprising since it isn't HP's software.

Build the mksimtape Utility

The format of a simh tape is discussed here:

mksimtape is a linux c program that will take a file or files and generate a simh emulated tape from them.

If you have cygwin on your windows PC, then you can generate a PC version of this program. I don't, so I will generate the program on a linux system. The rest of this procedure was done in linux.

•	The mksimtape program is found in:

https://github.com/simh/simtools/tree/master/converters

•	Get the source for the mksimtape program. Go to

https://github.com/simh/simtools

Click on the clone or download button and download zip:

•	Open simtools-master.zip, and go to converters/mksimtape directory:

Copy these files to the directory where you want mksimtape to reside.

linuxdev/mksimtape:ls

Makefile mksimtape mksimtape.c mksimtape.txt

•	Fixup and compile: There is already an executable in the zip file. I don't know what it was compiled under, but it isn't for windows or my linux distro. So you must delete the executable:

rm mksimtape

Now compile:

linuxdev/mksimtape:make

gcc -O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow -o mksimtape mksimtape.c

and test:

linuxdev/mksimtape:./mksimtape

mksimtape: at least one file must be specified

mksimtape: make SIMH tape image

Synopsis: mksimtape file ...

The tape image is written to standard output.

*** invalid %N$ use detected ***

Aborted

Build a Test Tape

I am going to walk through the process of building a simh tape that the HP3000 can read via fcopy.

•	To verify the process works, build a dummy file to put on the tape:

echo ABCDEFGHIJKLMNOPQRSTUVWXYZ >myfile.txt

•	Now create a tape of this file:

./mksimtape myfile.txt:80 >myfile.tap

Writing file myfile.txt with block size 80

•	At this point, I have to copy myfile.tap from my linux system to my windows system.

•	Mount the tape. In the simulator, type control-E to get to the sim prompt:

:

:<control-E here>

Simulation stopped, P: 071144 (PAUS 0)

sim>

Now assign the device type to the tape drive, then mount the tape as read only, and return to the emulation:

sim>set ms0 7970E

sim>attach -r ms0 myfile.tap

MS: unit is read only

sim>go

15:20/10/Vol (unlabelled) mounted on LDEV# 7

•	Copy the tape to the terminal.

Enter a file equation "T" for the tape drive that defines each record as 80 bytes, 1 rec / block, fixed length. I suspect all simh tape are going to have a blocking factor of 1.

If you are not familiar with the HP3000, files are WAY different than PC's or linux. In those O/S's the only types of files are binary and ascii. On the HP3000 you can specify all kinds of characteristics for files. Most importantly, almost all files are of a fixed record length which defines where they terminate. They are not terminated by a linefeed.

:FILE T;DEV=TAPE;REC=-80,1,F,ASCII

and now do the copy:

:FCOPY FROM=*T;TO=$STDLIST

HP32212A.3.19 FILE COPIER (C) HEWLETT-PACKARD CO. 1984

?15:24/#S1/18/LDEV# FOR "T" ON TAPE (NUM)?

Note the console request ?15:24/#S1/18/LDEV# FOR "T" ON TAPE (NUM)? The operator must tell the operating system that PIN 18 (like unix PID) will use the tape on LDEV 7. This is done via the REPLY command.

Further, you are in the middle of an fcopy command, so you can't just type in the REPLY. To reply, first you type control-A which will return the console prompt of =, then you can REPLY:

=REPLY 18,7

and the tape is copied:

ABCDEFGHIJKLMNOPQRSTUVWXYZ

EOF FOUND IN FROMFILE AFTER RECORD 0

1 RECORD PROCESSED *** 0 ERRORS

END OF SUBSYSTEM

:

That is the basics of getting files into the system.

Setting up RWIN to do File Transfers

Creating a tape in the above manner is messy, at best. In fact my only reason for figuring that procedure out was so I can get RWIN's PCLINK2 program copied on to the HP3000 so I can then do file transfers from RWIN.

This procedure will create a simh tape of the PCLINK2 program, then copy it onto the HP3000.

Locating PCLINK2

I believe Attachmate bought WRQ and Microfocus then bought Attachmate. I found a compatibility mode version of PCLINK2 at microfocus:

https://download2.microfocus.com/fileinfo.asp?filename=PCLINK2.ZIP

I downloaded the ZIP file on my linux system and then copy PCLINK2.PUB onto the linux system.

Moving PCLINK2 to the HP3000

•	Stripping the Header

The first issue is PCLINK2.PUB was created using RWIN's label option, so there is a label in the first 68 bytes of the file:

Nothing is ever easy!

Since I'm using linux, I will get rid of this using dd:

dd bs=68 skip=1 if=PCLINK2.PUB of=PCLINK2.OUT

and label gone:

•	Creating the tape.

As mentioned, the HP file system is picky about record length. Programs have a 256 byte record size, so I create the tape accordingly:

./mksimtape PCLINK2.OUT:256 >pclink2.tap

Writing file PCLINK2.OUT with block size 256

Copy that back to my windows system, and mount:

:<control-E>

Simulation stopped, P: 071144 (PAUS 0)

sim> attach -r ms0 pclink2.tap

MS: unit is read only

sim> go

15:50/10/Vol (unlabelled) mounted on LDEV# 7

•	Login as managers.sys and build empty file:

:HELLO MANAGER.SYS

CPU=1. CONNECT=91. THU, MAY 10, 1990, 3:51 PM

15:51/#S1/14/LOGOFF ON LDEV #20

15:51/#S3/19/LOGON FOR: MANAGER.SYS,PUB ON LDEV #20

HP3000 / MPE V E.01.00 (BASE E.01.00). THU, MAY 10, 1990, 3:51 PM

:BUILD PCLINK2.PUB;REC=128,1,F,BINARY;DISC=273,1;CODE=PROG

:

How did I know what to build? Program files use words, not bytes, so I use 128 rather than -256 as the record size. The blocking factor is always 1 and the records are always fixed and binary. That part I just know.

The file contains 273 records which I got by reading the RWIN label from above. The file is a program, so CODE=PROG (or 1029 as shown in the label). The HP3000 doesn't have extents such as .EXE to give it a hint as to what to do with files. Instead the operating system maintains that information separately.

•	Copy the tape to disk

Now we need the tape file equation that matches the tape I created:

:FILE T;DEV=TAPE;REC=128,1,F,BINARY

and we can now do the copy:

:FCOPY FROM=*T;TO=PCLINK2.PUB

HP32212A.3.19 FILE COPIER (C) HEWLETT-PACKARD CO. 1984

?15:58/#S3/20/LDEV# FOR "T" ON TAPE (NUM)?

=REPLY 20,7

EOF FOUND IN FROMFILE AFTER RECORD 272

273 RECORDS PROCESSED *** 0 ERRORS

END OF SUBSYSTEM

:

Did it work? Run it and see if you get this prompt:

:RUN PCLINK2

(#@#@#@)

If you have done this from the console, the break key doesn't work (it goes into the simulator command mode). Anytime the HP3000 is waiting for input, you can signal end of data by typing :eod which will exit the program.

Testing RWIN File Transfer

•	Let's make sure RWIN will actually transfer files. Start up RWIN and login using termtype 12:

:hello manager.sys;term=12

•	Once logged in, go to the simulator window and use control+E to get sim> prompt.

•	Now set the ATC Data line you logged in on (it was displayed when you connected to the HP3000 via telnet) to 8B which allows a full 8 bit data transfer:

sim>set atdc1 8b

sim>go

•	Now back on the HP3000 where you logged in as manager.sys, create the group tmp:

:newgroup tmp

•	and create a test data file:

:editor

HP32201A.7.16 EDIT/3000 MON, MAY 14, 1990, 10:53 AM

(C) HEWLETT-PACKARD CO. 1984

/a

1 this is a test

2 //

...

/k test.tmp,unn

/e

END OF SUBSYSTEM

:

•	Now, using file | transfer, we will transfer this test file from the HP3000 to the PC:

For local file name, enter the new file that will be created. For host file name, enter test.tmp. Protocol should be correct, and verify Transfer type is labels. Click on Transfer to PC button to receive the file.

•	Now take a look at the file on your PC. It should contain the label and the text:

[C:\tmp]type test.txt

RECSIZE=72;BLOCKFACTOR=3;CODE=0;EXTENTS=1;FILESIZE=1;ASCII;FORMAT=F this is a test

[C:\tmp]

•	Finally, let's transfer it back to the HP3000 under another name to make sure transfers in that direction work.

I change the host file name to test2.tmp and press the transfer to host button.

•	Now exit the file transfer window. For some reason this is doggedly slow on the emulator.

•	Now review the file on the HP3000:

:editor

HP32201A.7.16 EDIT/3000 MON, MAY 14, 1990, 11:16 AM

(C) HEWLETT-PACKARD CO. 1984

/t test2.tmp

FILE UNNUMBERED

/l all

1 this is a test

/e

END OF SUBSYSTEM

:

Upload QUAD

The stock editor EDIT/3000 sucks. QUAD (quick and dirty editor) is the one everyone I knew used. Let's get it installed into PUB.SYS

As above, login with termtype 12 and then set ATCD1:

Connected to the HP 3000 simulator ATCD device, line 1

:hello manager.sys;term=12

HP3000 / MPE V E.01.00 (BASE E.01.00). WED, MAY 16, 1990, 4:13 PM

:

Simulation stopped, P: 071144 (PAUS 0)

sim> set atcd1 8b

sim> go

and do the transfer:

NOTE: Since getting out of the file transfer window has been dicey, I start one RWIN session, go into the Transfer window, then leave it there doing all the transfers I need.

and run it:

listf quad.pub.sys,2

ACCOUNT= SYS GROUP= PUB

FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----

SIZE TYP EOF LIMIT R/B SECTORS #X MX

QUAD PROG 128W FB 1105 1105 1 1106 1 1

:run quad

QUAD -- JHK, Quest Software, KWS, Summit Information Systems, June, 1991

/

Upload and Install System UDC

User defined commands (UDCs) are a staple of the HP3000. Kind of like a BAT file but different. To make the HP3000 more friendly, at least for me, I want to setup my basic UDC file.

Transfer it:

Enable it:

:listf udc,2

ACCOUNT= SYS GROUP= PUB

FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----

SIZE TYP EOF LIMIT R/B SECTORS #X MX

UDC 80B FA 169 353 23 96 2 3

:release udc

:setcatalog udc;system

:

To see the commands in the UDC:

:showcatalog

UDC.PUB.SYS

STARTUP SYSTEM

SJ SYSTEM

SO SYSTEM

SM SYSTEM

...

To see what a specific command does:

:help t

USER DEFINED COMMAND:

T FILE="*S"

FILE QTEXT=!FILE

SETMSG OFF

RUN QUAD.SUP.EICS;PARM=1;INFO= "TABS 8,12,16,20,24,28,32,36,40,44,48,52,56,6

0,64,68,72; T *QTEXT"

RESET QTEXT

SETMSG ON

:

Setup Games Account

Transfer file that contains job to create games account:

:listf games,2

ACCOUNT= SYS GROUP= PUB

FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----

SIZE TYP EOF LIMIT R/B SECTORS #X MX

GAMES 80B FA 37 37 3 14 7 7

At the console, type streams to enable streaming of jobs:

:STREAMS 10

Stream file to create account:

:stream games

#J1

On the console you will see job #1 log in and out:

17:09/#J1/17/LOGON FOR: NEWA,MANAGER.SYS,PUB ON LDEV #10

17:09/#J1/17/LOGOFF ON LDEV #10

Now, report the account structure and it will appear as:

:report @.games

ACCOUNT FILESPACE-SECTORS CPU-SECONDS CONNECT-MINUTES

/GROUP COUNT LIMIT COUNT LIMIT COUNT LIMIT

GAMES 0 ** 0 ** 0 **

/PUB 0 ** 0 ** 0 **

:

and log in:

:hello mgr.games

CPU=1. CONNECT=2. WED, MAY 16, 1990, 5:12 PM

HP3000 / MPE V E.01.00 (BASE E.01.00). WED, MAY 16, 1990, 5:12 PM

:

Now we use RWIN to transfer all of the game files:

Setting Transfer link seems to get rid of need for TERM=12 and messing with ATCD:

Running Games

The pub.games group/account consists of various old games I had that run on this version of MPE.

The tmp.games group/account consists of games that don't work.

Login:

:hello mgr.games

CPU=1. CONNECT=2. MON, MAY 21, 1990, 3:57 PM

HP3000 / MPE V E.01.00 (BASE E.01.00). MON, MAY 21, 1990, 3:57 PM

:

To see the games, type:

:listf,2

ACCOUNT= GAMES GROUP= PUB

FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----

SIZE TYP EOF LIMIT R/B SECTORS #X MX

BGAMMON PROG 128W FB 28 28 1 29 1 1

HAMRBI PROG 128W FB 17 17 1 18 1 1

LANDER PROG 128W FB 29 29 1 30 1 1

MANSION PROG 128W FB 548 548 1 549 1 1

OTHELLO PROG 128W FB 38 38 1 39 1 1

SAHARA PROG 128W FB 70 70 1 71 1 1

TREK73 PROG 128W FB 516 516 1 517 1 1

WARP PROG 128W FB 1279 1279 1 1280 1 1

WARPADAT 80B FA 4312 4312 16 1355 8 8

WARPBDAT 512W FB 35 35 1 144 8 8

Some of these games have not been recompiled since the 1970's (bgammon, hamrbi, lander for sure). Yet they run just fine on the last generation of HP3000s. HP guaranteed user-written software would always be forward compatible.

My friends and I spent many, many hours playing trek73. We also spent hundreds of hours collaborating to win at adventure. Unfortunately, I have not been able to find adventure for the HP3000 in years.

Mansion and warp are text based adventure games of much greater complexity, though.

Some of these games require uppercase only, so if one doesn't seem to recognize what you are typing, do a CAPS LOCK.

To run any of the games, note the files with a code of PROG and just run them:

:RUN MANSION

WELCOME TO MYSTERY MANSION. (REV.17) MYSTERY # 30

YOU ARE IN FRONT OF A HEAVY IRON GATE WHICH IS APPARENTLY THE ONLY

WAY THROUGH A HIGH BRICK WALL PROTECTING AN OLD MANSION JUST VISIBLE

THROUGH THE GATE. A ROAD LEADS TO THE EAST AND WEST ALONG THE WALL.

IT IS DAWN AND A THIN LOW FOG IS JUST CLEARING FROM THE COOL AREAS.

BEHIND YOU TO THE SOUTH ON THE OTHER SIDE OF THE ROAD IS A HIGHWAY

GOING SOUTH AS FAR AS YOU CAN SEE. YOU CAN JUST SEE THE TAXI THAT

DROPPED YOU OFF, DRIVING OUT OF SIGHT.

Document Revisions

May 21, 2018

•	First Edition